import {
	request
} from '@/util/api.js'

// 我的名片列表
export const getBusinessList = (data) => {
	return request({
		url: 'api/business/get_list',
		method: 'post',
		data
	})
}

// 添加名片
// export const businessAdd = (data) => {
// 	return request({
// 		url: 'api/business/add',
// 		method: 'post',
// 		data
// 	})
// }

// 删除名片
// export const businessDel = (data) => {
// 	return request({
// 		url: 'api/business/del',
// 		method: 'post',
// 		data
// 	})
// }

// 修改名片
// export const businessEdit = (data) => {
// 	return request({
// 		url: 'api/business/edit',
// 		method: 'post',
// 		data
// 	})
// }

// 名片夹列表
// export const exchangeList = (data) => {
// 	return request({
// 		url: 'api/business/exchange_list',
// 		method: 'post',
// 		data,
// 		header: {
// 			'Content-Type': 'application/x-www-form-urlencoded'
// 		}
// 	})
// }

// 交换名片请求列表
export const exchangeRequestList = (data) => {
	return request({
		url: 'api/business/exchange_request_list',
		method: 'post',
		data,
		header: {
			'Content-Type': 'application/x-www-form-urlencoded'
		}
	})
}

// 交换名片审核处理
export const xchangeHandle = (data) => {
	return request({
		url: 'api/business/xchange_handle',
		method: 'post',
		data
	})
}

// // 交换名片列表-删除
// export const delCards = (data) => {
// 	return request({
// 		url: 'api/business/del_cards',
// 		method: 'post',
// 		data
// 	})
// }

// 同意审核时显示加入圈子时的名片
export const businessDisplayCard = (data) => {
	return request({
		url: 'api/business/display_card',
		method: 'post',
		data
	})
}

/******新接口********/

// 我的名片
export const getUserMember = (data) => {
	return request({
		url: 'api/user/member',
		method: 'post',
		data
	})
}

// 修改我的名片
export const editUserMember = (data) => {
	return request({
		url: 'api/user/up_member',
		method: 'post',
		data
	})
}

// 名片详情
export const businessDetail = (data) => {
	return request({
		url: 'api/business/host_card',
		method: 'post',
		data
	})
}

// 申请交换名片
export const exchangeCardApply = (data) => {
	return request({
		url: 'api/business/exchange_card_apply',
		method: 'post',
		data
	})
}

// 交换名片审核
export const enterpriseCard = (data) => {
	return request({
		url: 'api/message/enterprise_card',
		method: 'post',
		data
	})
}

// 名片夹
export const messageFriends = (data) => {
	return request({
		url: 'api/business/friends',
		method: 'post',
		data
	})
}

// 名片夹提示消息
export const businessMessagePush = (data) => {
	return request({
		url: 'api/business/message_push',
		method: 'get',
		data
	})
}

// 名片删除
export const businessDelCards = (data) => {
	return request({
		url: 'api/business/del_cards',
		method: 'post',
		data
	})
}

// 圈子————定位到我的名片
export const circleAnchor = (data) => {
	return request({
		url: 'api/Circle/anchor',
		method: 'get',
		data
	})
}

// 我的名片私密/公开状态
export const userOvert = (data) => {
	return request({
		url: 'api/user/overt',
		method: 'post',
		data
	})
}

// 发送消息
export const businessAddChat = (data) => {
	return request({
		url: 'api/business/add_chat',
		method: 'post',
		data
	})
}

// 聊天记录
export const businessChatList = (data) => {
	return request({
		url: 'api/business/chat_list',
		method: 'post',
		data
	})
}


// 微信步数授权
export const circleUsertep = (data) => {
	return request({
		url: 'api/circle/user_step',
		method: 'post',
		data
	})
}


// 是否显示引导页
export const messagePrompt = (data) => {
	return request({
		url: 'api/message/prompt',
		method: 'post',
		data
	})
}